package exsun.jt808.data.distribute_data.jt808;

import com.alibaba.fastjson.JSONObject;
import exsun.jt808.data.distribute_data.DistributeEntity;
import lombok.Data;

import java.text.SimpleDateFormat;
import java.util.List;
@Data
public class QueryAreaOrLineData extends DistributeEntity {
    /*
    *查询类型
    * 1=查询圆形区域总数
    * 2=查询矩形区域总数
    * 3=查询多边形区域总数
    * 4=查询线路总数
     */
    private int queryType;

    private List<Integer> lineIds;

        public JSONObject toJSONString() {
        JSONObject object = new JSONObject();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        object.put("queryType", queryType);
        object.put("lineIds", lineIds);
        object.put("versionId", versionId);
        object.put("distributeMsgTopic", distributeMsgTopic);
        object.put("msgId", msgId);
        object.put("devNo", devNo);
        object.put("requestId", requestId);
        object.put("userId", userId);
        object.put("userName", userName);
        object.put("distributeTime", sdf.format(distributeTime));
        object.put("serialNo", serialNo);
        object.put("response", response);
        return object;
    }
}
